package com.yizhang.generic.demo1;

import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        Apple apple = new Apple("苹果");
        System.out.println(apple.getkey());


        System.out.println("-----------------------------");

        Pair<String, Integer> pair = new Pair<>("count", 100);
        System.out.println(pair.getkey() + "=" + pair.getvalue());

        System.out.println("-----------------------------");

        System.out.println(pair.getNum(Arrays.asList(1, 2, 3)));

        System.out.println("-----------------------------");

        System.out.println(Pair.getStaticNum(Arrays.asList(1, 2, 3)));

        System.out.println("-----------------------------");

        pair.printType("小明", 100, true);

        System.out.println("-----------------------------");

        pair.printType("小明", "小红");
    }
}
